
package nav;

import java.util.Collection;
import java.util.HashMap;

public class LinkCollectionImpl implements ICollection {
	
	private HashMap<Integer, LinkTopologyObjectImpl> links = new HashMap<Integer, LinkTopologyObjectImpl>();
	
    public LinkCollectionImpl(){

    }

    public void add(Object o) {
        links.put(((LinkTopologyObjectImpl)o).getID(),(LinkTopologyObjectImpl)o );
    }

    public LinkTopologyObjectImpl get(int id) {
    	return links.get(id);
    }
    
    public Collection<LinkTopologyObjectImpl> getAllLinks(){
    	return links.values();
    }
    
    public void read(String source) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public String write() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    
}
